package com.scs.quality.controller;

import com.scs.base.response.JsonResult;
import com.scs.quality.pojo.dto.CheckQuery;
import com.scs.quality.pojo.vo.CheckVO;
import com.scs.quality.service.CheckService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
@RequestMapping("/v1/quality/check")
public class CheckController {
    @Autowired
    private CheckService checkService;
    @GetMapping("/select")
    public JsonResult selectCheck(CheckQuery checkQuery) {
        log.debug("查询检查项业务: {}",checkQuery);
        List<CheckVO> list = checkService.selectCheck(checkQuery);
        return JsonResult.ok(list);
    }

}
